package com.shanjupay.paymentagent.controller;


import com.shanjupay.common.util.QRCodeUtil;
import com.sun.jndi.toolkit.url.Uri;

import java.io.File;

public class TestCreateQrCode {
    public static void main(String[] args) {

        try {
        //String contents = "哈哈";
        //File qrCodeImge2 = ZxingUtils.getQRCodeImge(contents, 200, "G:\\24");
        //
        //String text = "https://www.baidu.com/";
        ////生成带logo 的二维码
        ////QRCodeUtil.encode(text, "d:/730.png", "d:/wfqrcode", true);
        ////生成不带logo 的二维码
        //String result= null;
        //
        //   // result = QRCodeUtil.encode(text,"","G:\\24",true);
        //    result = QRCodeUtil.encode(text, "G:\\24\\haha.png", "G:\\24", true);
        //System.out.println(result);
        //指定二维码图片，解析返回数据
        //System.out.println(QRCodeUtil.decode("D:/WPS/75040887.jpg"));

            //String decode = QRCodeUtil.decode("G:\\24\\88573538.jpg");
            //System.out.println(decode);
            //
            //String uriStr = "https://www.mi.com/about/";


            //Intent intent = new Intent(Intent.ACTION_VIEW,( Uri.parse(uriStr))).addCategory(Intent.CATEGORY_BROWSABLE).addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
            //startActivity(intent);




            QRCodeUtil.generatEncodeTest("G:\\24\\","zxing.png","001","13019931996");
            QRCodeUtil.parseDecodeTest("G:\\24\\zxing.png");




        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}
